package com.fire.control.system.module.system.controller.app;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.fire.control.system.module.common.controller.BaseController;
import com.fire.control.system.module.user.service.IUserService;
import com.fire.control.system.standard.BusinessInterfaceStandard;
import com.fire.control.system.support.protocol.comman.ResponseProtocol;
import com.fire.control.system.support.protocol.sys.SystemRequestProtol;

/**
 * @author liuxincheng
 * @ClassName: SysControl
 * @Description: TODO(系统控制器)
 * @date 2017年6月16日 下午3:53:03
 */
@RestController
@RequestMapping(path="app/sysCtr")
public class SysControl extends BaseController implements BusinessInterfaceStandard<SystemRequestProtol, ResponseProtocol> {

	@Autowired
	private IUserService userService;
	
	/**
	 * @author  liuxincheng
	 * @Title: modifyPassword
	 * @Description: TODO(修改用户密码)
	 * @param @param requestProtocol
	 * @param @return    设定文件
	 * @return ResponseProtocol    返回类型
	 * @throws null
	 */
	@RequestMapping(path="modifyPassword",method=RequestMethod.POST)
	public ResponseProtocol modifyPassword(@RequestBody SystemRequestProtol requestProtocol){
		ResponseProtocol response = userService.modifyPassword(requestProtocol,this.getUser());
		return response;
	}
}
